/*
 * Created by Jaren at 2022/8/15 8:47
 */
import 'dart:async';

import 'dart:io';

import 'package:inmotion_protocol/base/base_message.dart';
import 'package:inmotion_protocol/base/protocol.dart';
import 'package:inmotion_protocol/common/media_file_upload_manager.dart';
import 'package:inmotion_protocol/ezcan/file/ezcan_file_manager.dart';

class EzcanLightEffectFileUploadManager extends LightEffectPkgFileUploadManager {

    EzcanLightEffectFileUploadManager(Protocol<IMessage> protocol) : super(protocol);

    @override
    Future<bool> clearCacheFiles() {
        return Future.value(true);
    }

    @override
    MediaUploadConfig createConfig(File localFile, int pkgId) {
        return EzCANLightEffectFileConfig(localFile);
    }

    @override
    Future renameFileIfNeed(int id, StreamController<UploadEvent> streamController) {
        return Future.value(false);
    }

    @override
    Future<bool> checkStorageCapacityImpl(int size) {
        return Future.value(true);
    }
}

class EzCANLightEffectFileConfig extends EzcanConfig with MediaUploadConfig {

    EzCANLightEffectFileConfig(File localFile) : super(localFile, EzcanConfig.typeLightEffect);

}